Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task validation fixes and rewrites (by Steampunk Spotter) #8

Merged
merged 2 commits into from
Sep 15, 2023

Conversation

anzoman
Copy link
Contributor

@anzoman anzoman commented Sep 15, 2023

Overall Review of Changes:
These changes will try to correct one error and multiple hints within Ansible tasks I have encountered when running some checks with Steampunk Spotter.

Enhancements:
The first change fixes the following error detected by the Spotter CLI:

(.venv) user@ubuntu:~/UBUNTU22-CIS$ spotter scan --ansible-version 2.12 --display-level error .
Scanning...success. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
------------------------------------------------------------------------
tasks/pre_remediation_audit.yml:60:9: ERROR: [E005] that is a required parameter in module ansible.builtin.assert.
------------------------------------------------------------------------
Spotter took 2.135 s to scan your input.
It resulted in 1 error(s), 27 warning(s) and 227 hint(s).
Overall status: ERROR

I also used Spotter's rewrite feature (--rewrite) to correct a bad practice of inline passing of parameters to modules and replaced that with exact parameters.

How has this been tested?:
N/A

How has this been tested?:
Please give an overview of how these changes were tested. If they were not please use N/A

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congrats on opening your first pull request and thank you for taking the time to help improve Ansible-Lockdown!
Please join in the conversation happening on the Discord Server as well.

Copy link
Member

@uk-bolly uk-bolly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice adoption of best practices

@uk-bolly uk-bolly merged commit bf38dd4 into ansible-lockdown:devel Sep 15, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants